﻿@model Lottery.Models.Home.BaseModel
@{
    Layout = "~/Views/Shared/_Base.cshtml";
}
<head>
    <title>@ViewBag.Title</title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#layout").ligerLayout({ leftWidth: 200, topHeight: 50, bottomHeight: 30 });
            var height = $(".l-layout-center").height();
            var accordion = $("#accordion").ligerAccordion({ height: height - 24 });

            $(window).resize(function () {
                accordion.setHeight($(".l-layout-center").height() - 24);
            });

            if ($("#accordion>.system_menu_active").index() != 1) {
                $("#accordion>.system_menu_active").prev().click();
            }

            $(".system_link").hover(function () {
                $(this).addClass("system_link_over");
            }, function () {
                $(this).removeClass("system_link_over");
            });
        });

        
    </script>
</head>
<body>
    <div id="layout">
        <div position="top">
            <div class="system_logo">
                @*<img src="../../Content/image/中国南方电网.png" />*@
            </div>
            <div class="system_name">
                <h3>会员系统</h3>
            </div>
            <div class="system_user">
                <span>用户： <a href="#" class="system_link">@Session["LT-User"]</a></span> <span>|</span>
                <a href="/Home/ChangePassword" class="system_link">修改密码</a> <span>|</span>
                <a href="/Home/Logout" class="system_link">退出</a>
            </div>
        </div>
        <div position="left" title="菜单" id="accordion">
              @foreach (var menu in Model.MenuList)
              {
                  if (menu.IsSelect)
                  {
                <div title="@menu.Title" class="system_menu system_menu_active">
                    @if (menu.SubMenu == null)
                    {
                        return;
                    }
                    <ul>
                        @foreach (var subMenu in menu.SubMenu)
                        {
                            if (subMenu.IsSelect)
                            {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link_over">@subMenu.Title</a>
                            }
                            else
                            {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link">@subMenu.Title</a>
                            }
                        }
                    </ul>
                </div>
                  }
                  else
                  {
                <div title="@menu.Title" class="system_menu">
                    @if (menu.SubMenu == null)
                    {
                        return;
                    }
                    <ul>
                        @foreach (var subMenu in menu.SubMenu)
                        {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link">@subMenu.Title</a>
                        }
                    </ul>
                </div>
                  }
              }
            }
        </div>
        @{
            <div position="center" title="@Model.Caption">
                <div class="system_scroll_container">
                @RenderBody()
                </div>
            </div>
            
        }
        <div position="bottom">
            <div class="system_copy_right">
                &copy; 2011 <a href="#" class="system_link">Your Company</a>, All Rights Reserved
                &reg;</div>
            <div class="system_support">
                技术支持：<a href="#" class="system_link">Anson</a></div>
        </div>
    </div>
</body>
<script type="text/javascript">
    $(function () {

        $('#mainmenu').find('> li').hover(function () {
            $(this).find('ul')
		.removeClass('noJS')
		.stop(true, true).slideToggle('fast');
        });

    });
</script>
